package com;
//数组反转
public class TwoTest {
    public static void main(String[] args) {
        int[] nums = {23, 43, 542, 552};

        int[] newNums = new int[nums.length];
        for (int i = 0; i < nums.length; i++) {
            newNums[newNums.length - 1 - i] = nums[i];
        }
        nums = newNums;
        for (int num : nums) {
            System.out.println(num);
        }
    }
}